package C06.E1;

import java.util.ArrayList;

public class E1 {
    public static void main(String[] args) {
        ArrayList list = new ArrayList();
        list.add("张森");
        list.add("贾多多");
        list.add("孟小格");
        list.add("郭圈圈");
        list.add(Math.PI);
        //查看list长度
        System.out.println("集合长度:" + list.size());
        System.out.println(list);
        //查看指定位置元素
        System.out.println("第2个元素是:" + list.get(1));
        //修改指定元素
        list.set(2,"沐沐");
        System.out.println(list);
        list.add(2,"隔壁小付");
        System.out.println(list);
        list.remove(5);
        System.out.println(list);
    }
}
